<template>
  <a-drawer
    :title="title"
    :visible="visible"
    width="90%"
    @close="
      () => {
        this.visible = false
      }
    "
  >
    <a-form-model ref="form" :model="entity" :rules="rules" v-bind="layout">
      <a-row>
        <a-col :span="8">
          <a-form-model-item label="客户名称" prop="CustomerName">
            <CustRemoteSearchByCondition
              v-model="entity.CustomerId"
              :disabled="disabled"
              :is-my-data="true"
              mode="default"
              placeholder="检索客户(名称/编号)(省市区名称禁止查询)"
              @BindCustomer="BindCustomer">
            </CustRemoteSearchByCondition>
          </a-form-model-item>
        </a-col>
        <a-col :span="8">
          <a-form-model-item label="销售经理" prop="AccountManager">
            <a-input v-model="entity.AccountManager" :disabled="true" autocomplete="off" placeholder="销售经理"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="8">
          <a-form-model-item label="报价编号">
            <a-input v-model="entity.DocumentNo" autocomplete="off" disabled placeholder="系统自动生成"/>
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="8">
          <a-form-model-item label="联系人" prop="LinkMan">
            <!-- <a-input disabled v-model="entity.LinkMan" autocomplete="off" placeholder="联系人" /> -->
            <a-select v-model="entity.LinkMan" :disabled="disabled" placeholder="客户联系人" @change="Contacts($event)">
              <a-select-option v-for="item in List" :key="item.Id" :value="item.Name"> {{ item.Name }}</a-select-option>
            </a-select>
          </a-form-model-item>
        </a-col>
        <a-col :span="8">
          <a-form-model-item label="付款方式" prop="TransactionType">
            <a-select v-model="entity.TransactionType" :disabled="disabled" placeholder="付款方式" style="width: 100%">
              <a-select-option v-for="item in list" :key="item.Id" :value="item.DicName">
                {{ item.DicName }}
              </a-select-option>
            </a-select>
            <!-- <a-input v-model="entity.TransactionType" autocomplete="off" placeholder="交易类型" /> -->
          </a-form-model-item>
        </a-col>

        <a-col :span="8">
          <a-form-model-item label="开票类型" prop="BillingType">
            <a-select v-model="entity.BillingType" :disabled="disabled" placeholder="开票类型" style="width: 100%">
              <a-select-option v-for="item in BillingType" :key="item.Id" :value="item.DicName">
                {{ item.DicName }}
              </a-select-option>
            </a-select>
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="8">
          <a-form-model-item label="折扣(%)" prop="Discount">
            <a-input
              v-model="entity.Discount"
              :disabled="disabled"
              autocomplete="off"
              style="text-align: right;"
              type="number"
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="8">
          <a-form-model-item label="折扣后金额">
            <a-input v-model="entity.TotalAmount" autocomplete="off" disabled style="text-align: right;"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="8">
          <a-form-model-item label="税金">
            <a-input v-model="entity.Taxes" autocomplete="off" disabled style="text-align: right;"/>
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="8">
          <a-form-model-item label="价格表" prop="PriceListName">
            <!-- <a-input v-model="entity.PriceListId" autocomplete="off" placeholder="价格表" /> -->
            <a-input v-model="entity.PriceListName" disabled placeholder="价格表" style="width: 85%"></a-input>
            <a-button :disabled="disabled" style="width: 15%" type="primary" @click="PriceListOpen">
              <a-icon type="search"/>
            </a-button>
          </a-form-model-item>
        </a-col>

        <a-col :span="8">
          <a-form-model-item label="运费(元)" prop="Freight">
            <a-input
              v-model="entity.Freight"
              :disabled="disabled"
              autocomplete="off"
              style="text-align: right;"
              type="number"
              @blur="Freight"
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="8">
          <a-form-model-item label="运输方式" prop="TransportType">
            <a-select v-model="entity.TransportType" :disabled="disabled" placeholder="运输方式" style="width: 100%">
              <a-select-option v-for="item in TransportType" :key="item.Id" :value="item.DicName">
                {{ item.DicName }}
              </a-select-option>
            </a-select>
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="8">
          <a-form-model-item label="送货地址" prop="DeliveryAddress">
            <a-textarea v-model="entity.DeliveryAddress" :disabled="disabled" autocomplete="off"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="8">
          <a-form-model-item label="备注" prop="Remark">
            <a-textarea v-model="entity.Remark" :disabled="disabled" autocomplete="off"/>

            <!-- <a-input :disabled="disabled" v-model="entity.Remark" autocomplete="off" placeholder="备注" /> -->
          </a-form-model-item>
        </a-col>
        <a-col :span="8">
          <a-form-model-item label="申请日期">
            <a-date-picker v-model="entity.ApplyDate" :disabled="disabled" format="YYYY-MM-DD" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="8">
          <a-form-model-item v-if="title == '查看' || title == '审核' || title == '修改'" label="审核日期">
            <a-date-picker
              v-model="entity.ApprovalDate"
              :disabled="title == '查看'"
              format="YYYY-MM-DD"
              style="width: 100%"
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="8">
          <a-form-model-item
            v-if="title == '查看' || title == '审核' || title == '修改'"
            label="审批意见"
            prop="ApprovalComments"
          >
            <a-input v-model="entity.ApprovalComments" :disabled="title == '查看'" autocomplete="off"/>
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
    <a-table
      ref="table"
      :bordered="true"
      :columns="columns"
      :dataSource="data"
      :pagination="pagination"
      :rowKey="(row, index) => row.Id"
      :scroll="{ y: 460 }"
      class="tables"
      size="small"
      @change="handleTableChange">
      <!-- <span slot="CreateTime" slot-scope="CreateTime">{{ timeFormat(CreateTime) }}</span> -->
      <span slot="action" slot-scope="text, record, index">
        <template>
          <!-- <a @click="handleEdit(record.Id)">编辑</a>
          <a-divider type="vertical" /> -->
          <a
            v-if="hasPerm('Quot_PriceListDetails.Delete')"
            :disabled="disabled"
            @click="handleDelete([record.Id], index)"
          >删除</a
          >
        </template>
      </span>
      <template slot="cInvName" slot-scope="text, record">
        <span>{{ record.ProductId || record.cInvCode }}/{{ record.cInvName }}</span>
      </template>
      <template slot="ProductIdNum" slot-scope="text, record">
        <a-input
          v-model="record.ProductIdNum"
          :disabled="disabled"
          class="input"
          size="small"
          style="text-align: right;"
          type="number"
          @change="ProductIdNum(record)"
        ></a-input>
      </template>
      <template slot="TaxRate" slot-scope="text, record">
        <a-input
          v-model="record.TaxRate"
          :disabled="disabled"
          class="input"
          size="small"
          style="text-align: right;"
          type="number"
        >
        </a-input>
      </template>
      <template slot="Tax_Included_Price" slot-scope="Tax_Included_Price">
        <span v-format="'#,##0.00'">{{ Tax_Included_Price }}</span>
      </template>
      <template slot="Tax_Excluded_Price" slot-scope="Tax_Excluded_Price">
        <span v-format="'#,##0.00'">{{ Tax_Excluded_Price }}</span>
      </template>
      <template slot="Amounts" slot-scope="Amounts">
        <span v-format="'#,##0.00'">{{ Amounts }}</span>
      </template>
      <template slot="Tax" slot-scope="Tax">
        <span v-format="'#,##0.00'">{{ Tax }}</span>
      </template>
      <template slot="Remark" slot-scope="text, record">
        <a-input v-model="record.Remark" :disabled="disabled" size="small"></a-input>
      </template>
    </a-table>
    <PriceChoose ref="materialChoose" @onChoose="handleChoose"></PriceChoose>
    <Price ref="Price" @PriceList="PriceList"/>
    <div
      :style="{
        position: 'absolute',
        right: 0,
        bottom: 0,
        width: '100%',
        borderTop: '1px solid #e9e9e9',
        padding: '5px 16px',
        background: '#fff',
        textAlign: 'right',
        zIndex: 1
      }">
      <!-- <span
        >含税价格合计: <i class="price"> {{ j }}</i> </span
      >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <span
        >不含税价格合计: <i class="price"> {{ n }}</i> </span
      >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -->
      <p style="display:inline-block;margin-right:50px;">金额合计: <span class="calcPrice" v-format="'#,##0.00'">{{ c }}</span> </p>
      <a-button v-if="title != '审核' && title != '查看'" type="primary" @click="addTable">添加</a-button>&nbsp;
      <a-button @click="close">取消</a-button>&nbsp;
      <a-button v-if="title != '审核' && title != '查看'" type="primary" @click="handleSubmit">保存</a-button>
    </div>
  </a-drawer>
</template>

<script>
import OperatorCache from '@/utils/cache/OperatorCache'
import PriceChoose from '@/components/PriceChoose/MaterialChooseCopy1.vue'
import Price from '../Quot_OfferSheetMain/Price.vue'
import CustRemoteSearchByCondition from '@/components/RemoteSearch/CustRemoteSearchByCondition'
import moment from 'moment'

const columns = [
  { title: '品名', dataIndex: 'cInvName', scopedSlots: { customRender: 'cInvName' }, width: '20%' },
  { title: '规格型号', dataIndex: 'cInvStd' },
  { title: '产品数量', dataIndex: 'ProductIdNum', align: 'right', scopedSlots: { customRender: 'ProductIdNum' } },
  { title: '税率%', dataIndex: 'TaxRate', scopedSlots: { customRender: 'TaxRate' } },
  { title: '含税单价', dataIndex: 'Tax_Included_Price', align: 'right', scopedSlots: { customRender: 'Tax_Included_Price' } },
  { title: '不含税价格', dataIndex: 'Tax_Excluded_Price', align: 'right', scopedSlots: { customRender: 'Tax_Excluded_Price' } },
  { title: '金额', dataIndex: 'Amounts', align: 'right', scopedSlots: { customRender: 'Amounts' } },
  { title: '税金', dataIndex: 'Tax', align: 'right', scopedSlots: { customRender: 'Tax' } },
  { title: '备注', dataIndex: 'Remark', scopedSlots: { customRender: 'Remark' } },
  { title: '操作', dataIndex: 'action', align: 'left', scopedSlots: { customRender: 'action' } }
]

export default {
  props: {
    parentObj: Object,
    disabled: { type: Boolean, required: false }
  },
  data () {
    return {
      cc: false,
      IsLadderPrice: false, // 是否采用区间价格
      // StandardPrice: 0, // 标准价格
      gettime: '',
      selectedRowKeys: [],
      pagination: {
        current: 1,
        pageSize: 25,
        showTotal: (total, range) => `总数:${total} 当前:${range[0]}-${range[1]}`,
        pageSizeOptions: ['25', '50', '100'], // 设置pageSize的可选值，页面可以通过下拉框进行选择
        showSizeChanger: true,
        onShowSizeChange: (current, pageSize) => {
          this.pageSize = pageSize
        }
      },
      List: [],
      filters: {},
      n: 0,
      c: 0,
      a: 0,
      j: 0,
      TaxAll: 0,
      sorter: { field: 'Id', order: 'desc' },
      layout: {
        labelCol: { span: 5 },
        wrapperCol: { span: 18 }
      },
      id: '',
      TransportType: [], // 运输方式
      columns,
      BillingType: [],
      data: [],
      list: [],
      QOSD_List: [],
      visible: false,
      loading: false,
      entity: {},
      rules: {
        CustomerName: [{ required: true, message: '未输入', trigger: 'blur' }],
        PriceListName: [{ required: true, message: '未输入', trigger: 'blur' }],
        // LinkMan: [{ required: true, message: '未输入', trigger: 'blur' }],
        TransactionType: [{ required: true, message: '未输入', trigger: 'change' }],
        BillingType: [{ required: true, message: '未输入', trigger: 'blur' }],
        TotalAmount: [{ required: true, message: '未输入', trigger: 'blur' }],
        Taxes: [{ required: true, message: '未输入', trigger: 'blur' }],
        Discount: [{ required: true, message: '未输入', trigger: 'blur' }],
        DeliveryAddress: [{ required: true, message: '未输入', trigger: 'blur' }],
        Freight: [{ required: true, message: '未输入', trigger: 'blur' }]
      },
      title: ''
    }
  },
  components: {
    PriceChoose,
    CustRemoteSearchByCondition,
    Price
  },
  watch: {
    data: {
      handler (n, o) {
        this.$nextTick(() => {
          // 金额
          this.a = 0
          // 含税价
          this.j = 0
          // 不含税价
          this.n = 0
          this.TaxAll = 0
          n.length > 0 &&
          n.forEach(item => {
            if (Number(item.ProductIdNum) < 0) {
              this.$message.warning('数量不能小于0')
              this.$set(item, 'ProductIdNum', 1)
            }
            if (Number(item.TaxRate) < 0) {
              this.$message.warning('税率不能小于0')
              this.$set(item, 'TaxRate', 1)
            }
            if (Number(item.Tax_Included_Price) < 0) {
              this.$message.warning('价格不能小于0')
              this.$set(item, 'Tax_Included_Price', 1)
            }
            this.j += Number(item.Tax_Included_Price)
            this.n += Number(item.Tax_Excluded_Price)
            // 金额
            item.Amounts = item.ProductIdNum * item.Tax_Included_Price
            // 不含税价格
            item.Tax_Excluded_Price = (item.Tax_Included_Price / (item.TaxRate / 100 + 1)) * item.ProductIdNum

            // 税金
            item.Tax =
              (item.Tax_Included_Price - item.Tax_Included_Price / (item.TaxRate / 100 + 1)) * item.ProductIdNum
            this.TaxAll += Number(item.Tax)
            this.a += Number(item.Amounts)
          })

          this.j = this.j.toFixed(2)
          this.c = 0
          if (this.a) {
            this.c = this.a
          }
          let TotalMomey = 0
          TotalMomey = this.a * (this.entity.Discount / 100)
          TotalMomey = TotalMomey.toFixed(2).replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
          this.$set(this.entity, 'TotalAmount', TotalMomey)
          this.entity.Taxes = this.TaxAll * (this.entity.Discount / 100)
          this.entity.Taxes = this.entity.Taxes.toFixed(2).replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
        })
      },
      deep: true,
      immediate: true
    },

    'entity.Freight': {
      handler (newVal, oldVal) {
        if (newVal < 0) {
          this.$set(this.entity, 'Freight', 1)
          return this.$message.error('运费不可以小于0')
        }
      },
      deep: true,
      immediate: true
    },
    'entity.Discount': {
      handler (newVal, oldVal) {
        if (newVal > 100) {
          this.$set(this.entity, 'Discount', 100)
          return this.$message.error('折扣不可以大于100')
        }
        if (newVal < 0) {
          this.$set(this.entity, 'Discount', 1)
          return this.$message.error('折扣不可以小于0')
        }
        if (newVal) {
          let TotalMomey = 0
          TotalMomey = this.a * (this.entity.Discount / 100)
          TotalMomey = TotalMomey.toFixed(2).replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
          this.$set(this.entity, 'TotalAmount', TotalMomey)
          this.entity.Taxes = this.TaxAll * (this.entity.Discount / 100)
          this.entity.Taxes = this.entity.Taxes.toFixed(2).replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
        }
      },
      deep: true,
      immediate: true
    }
  },

  created () {
    this.getSelsct()
    this.getTransportType() // 运输方式
    this.getBillingType()
  },
  methods: {
    Freight (e) {
      if (this.entity.Freight) this.entity.Freight = Number(this.entity.Freight).toFixed(2)
    },
    PriceBlur (e, row) {
      if (row.Tax_Included_Price) row.Tax_Included_Price = Number(row.Tax_Included_Price).toFixed(2)
    },
    ProductIdNum (item) {
      if (this.IsLadderPrice) {
        if (Number(item.ProductIdNum) > item.NumLowerLimit1 && item.ProductIdNum <= item.NumLowerLimit2) {
          item.Tax_Included_Price = item.LowerLimitPrice1.toFixed(2)
        }
        if (Number(item.ProductIdNum) > item.NumLowerLimit2 && item.ProductIdNum <= item.NumLowerLimit3) {
          item.Tax_Included_Price = item.LowerLimitPrice2.toFixed(2)
        }
        if (Number(item.ProductIdNum) > item.NumLowerLimit3) {
          item.Tax_Included_Price = item.LowerLimitPrice3.toFixed(2)
        }
        if (Number(item.ProductIdNum) < item.NumLowerLimit1) {
          item.Tax_Included_Price = item.Price.toFixed(2)
        }
      }
    },
    // 选中的当前行
    PriceList (a) {
      this.IsLadderPrice = a[0].IsLadderPrice
      this.$set(this.entity, 'PriceListId', a[0].Id)
      this.$set(this.entity, 'PriceListName', a[0].ListName)
    },
    BindCustomer (val) {
      this.$set(this.entity, 'CustomerName', val == null ? null : val.cCusName)
      this.$set(this.entity, 'CustomerId', val == null ? null : val.Id)
      this.$set(this.entity, 'DeliveryAddress', val == null ? null : val.cCusAddress)
      this.$set(this.entity, 'LinkMan', '')
      this.contactPerson(val == null ? null : val.Id)
      this.entity.AccountManager = val == null ? null : val.PrincipalName
      this.cc = true
    },
    // 联系人change事件
    Contacts (value) {
      // this.entity.LinkManTel = value
    },
    // 联系人
    contactPerson (id) {
      this.$http
        .post('/CustomerManagement/Cust_CustomerLinkMan/GetDataListByConditions', {
          Search: [
            {
              Condition: 'CustomerId',
              Keyword: id
            }
          ],
          ...this.filters
        })
        .then(resJson => {
          this.loading = false
          this.List = resJson.Data
        })
    },
    getBillingType () {
      this.$http
        .post('/Base_BasicData/Base_DictionaryMain/GetTheDataByDicKey', {
          Condition: 'DicKey',
          Keyword: 'Billingtype'
        })
        .then(res => {
          if (res.Data.DictionaryDetailsList) this.BillingType = res.Data.DictionaryDetailsList
        })
    },
    getSelsct () {
      this.$http
        .post('/Base_BasicData/Base_DictionaryMain/GetTheDataByDicKey', {
          Condition: 'DicKey',
          Keyword: 'ces'
        })
        .then(res => {
          this.list = res.Data.DictionaryDetailsList
        })
    },
    getTransportType () {
      this.$http
        .post('/Base_BasicData/Base_DictionaryMain/GetTheDataByDicKey', {
          Condition: 'DicKey',
          Keyword: 'shipvia'
        })
        .then(res => {
          this.TransportType = res.Data.DictionaryDetailsList
        })
    },
    // 子表删除
    handleDelete (ids, index) {
      if (ids[0]) {
        var thisObj = this
        this.$confirm({
          title: '确认删除吗?',
          onOk () {
            return new Promise((resolve, reject) => {
              thisObj.$http.post('/QuotationManagement/Quot_OfferSheetDetails/DeleteData', ids).then(resJson => {
                resolve()

                if (resJson.Success) {
                  thisObj.$message.success('操作成功!')

                  thisObj.getDataList()
                } else {
                  thisObj.$message.error(resJson.Msg)
                }
              })
            })
          }
        })
      } else {
        this.data.splice(index, 1)
      }
    },
    onSelectChange (selectedRowKeys) {
      this.selectedRowKeys = selectedRowKeys
    },
    handleTableChange (pagination, filters, sorter) {
      this.pagination = { ...pagination }
      this.filters = { ...filters }
      this.getDataList()
    },
    op () {
      return OperatorCache.info
    },
    close () {
      this.visible = false
      this.entity = {}
    },

    init () {
      this.visible = true
      this.entity = {}
      this.data = []
      this.$set(this.entity, 'Discount', 100)
      this.entity.ApplyDate = moment(new Date())
      this.entity.ApprovalDate = moment(new Date())
      this.UserList = []
      this.$nextTick(() => {
        this.$refs['form'].clearValidate()
      })
      this.$nextTick(() => {
        this.$refs['form'].clearValidate()
      })
    },
    addTable () {
      if (!this.entity.PriceListId || !this.entity.CustomerName) {
        this.$message.warning('请选择客户和价格表')
        return
      } else {
        this.$refs.materialChoose.openChoose(this.entity.PriceListId)
      }
    },
    getCurrentTime () {
      // 获取当前时间并打印
    },
    openForm (id, title) {
      this.init()
      this.title = title

      if (id) {
        this.loading = true
        this.id = id
        this.getDataList()
      }
    },
    getDataList () {
      this.$http
        .post('/QuotationManagement/Quot_OfferSheetMain/GetTheDataOfAll', {
          PageIndex: this.pagination.current,
          PageRows: this.pagination.pageSize,
          SortField: 'Id',
          SortType: 'desc',
          Search: {
            Condition: 'Id',
            Keyword: this.id
          }
        })
        .then(res => {
          if (res.Success) {
            this.entity = res.Data
            this.contactPerson(this.entity.CustomerId)
            if (this.entity['ApplyDate']) {
              this.entity['ApplyDate'] = moment(this.entity['ApplyDate'])
            }
            if (this.entity['ApprovalDate']) {
              this.entity['ApprovalDate'] = moment(this.entity['ApprovalDate'])
            }
            this.data = res.Data.QOSD_List
            if (res.Data.Total) {
              const pagination = { ...this.pagination }
              pagination.total = res.Data.Total
              this.pagination = pagination
            }
          } else {
            this.$message.error(res.Msg)
          }
        })
    },
    handleChoose (a) {
      const ar = [];
      this.data.forEach(item => {
        a.forEach((val, i) => {
          if (item.ProductId == val.cInvCode) {
            ar.push(val)
            delete a[i]
          }
        })
      })
      if (ar.length == 0) {
        a.forEach(item => {
          this.data.push({
            ProductId: item.cInvCode,
            cInvName: item.cInvName,
            cInvCode: item.cInvCode,
            cInvStd: item.cInvStd,
            TaxRate: 13,
            ProductIdNum: 1,
            Price: item.StandardPrice,
            Tax_Included_Price: item.StandardPrice,
            NumLowerLimit1: item.NumLowerLimit1,
            NumLowerLimit2: item.NumLowerLimit2,
            NumLowerLimit3: item.NumLowerLimit3,
            LowerLimitPrice1: item.LowerLimitPrice1,
            LowerLimitPrice2: item.LowerLimitPrice2,
            LowerLimitPrice3: item.LowerLimitPrice3
          })
        })
      } else {
        this.$message.error('重复产品已筛选掉')
        a.forEach(item => {
          this.data = [...this.data, item]
        })
      }
    },
    PriceListOpen () {
      this.$refs.Price.openForm()
    },
    handleSubmit () {
      this.$refs['form'].validate(valid => {
        if (!valid) {
          return
        }

        if (this.title == '修改') this.entity.ApprovalStatus = null
        if (this.data.length == 0) {
          this.$message.warning('请添加产品')
          return
        }
        var entityData = { ...this.entity }
        var QOSD_List = [...this.data]
        this.QOSD_List = QOSD_List
        //console.log(this.QOSD_List)

        entityData.QOSD_List = this.QOSD_List

        this.$http.post('/QuotationManagement/Quot_OfferSheetMain/SaveData', entityData).then(resJson => {
          this.loading = false

          if (resJson.Success) {
            this.$message.success('操作成功!')
            this.visible = false

            this.parentObj.getDataList()
          } else {
            this.$message.error(resJson.Msg)
          }
        })
      })
    }
  }
}
</script>

<style scoped>
.calcPrice {
  font-size: 20px;
  font-weight: bold;
  font-style: italic;
  color: red;
}
</style>
